/*
 * @Description: 
 * @Author: 赵大壮
 * @Date: 2021-12-06 17:18:37
 * @LastEditTime: 2023-07-06 12:11:33
 * @LastEditors: 赵大壮
 */
import { Component, Vue, Inject } from "vue-property-decorator";
import DZServiceDic from "../service/DZServiceDic";
import UiDialogAddDic from "@/components/ui-dialog/UiDialogAddDic.vue"
@Component({
    components: { UiDialogAddDic }
})
export default class Index extends Vue {

    bool_dialog_add_dic = false;

    s_dic = new DZServiceDic();

    created() {
        this.action_list_dic();
    }

    mounted() {

    }

    beforeDestroy() {

    }

    action_list_dic() {
        this.s_dic.net_list_dic();
    }

    action_del_dic(id) {
        this.s_dic.net_del_dic(id, () => {
            this.action_list_dic();
        })
    }

    action_add_dic(name) {
        this.s_dic.net_add_dic(name, () => {
            this.bool_dialog_add_dic = false;
            this.action_list_dic();
        })
    }

    action_page_change(cur_page) {
        this.s_dic.m_page.page = cur_page;
        this.action_list_dic();
    }
}